<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1" />
		<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<link href="css/ratchet.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/page.css" />
		<link rel="stylesheet" type="text/css" href="css/product.css" />
		<link rel="stylesheet" type="text/css" href="css/pro2.css" />
		<link rel="stylesheet" href="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css">
		<!-- jquery Mobile -->
		<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
		<script src="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
		<link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.css" />
		<link rel="stylesheet" href="css/style.css" />
		<script>$.mobile.ajaxEnabled = false;</script>
		<title>20.商品详情</title>
		<style>
		.rightc p,img{
			width: auto;
			
		}
		.rightc{
			width: 100%;
		}
		</style>
		<script>
		var product = {
			id:1,
			descrption:"平板电脑",
			price:4000,
			imgUrl:["img/p_detail/pad4.JPG","img/p_detail/pad5.JPG"],
		}

		function toArray(product){
			var product1=[0,1,2,3,4];
			product1[0]=product.descrption.toString();
			return product1;
		}
		product.imgUrl[2]="img/p_detail/ipad1.jpg";
		console.log(product);
		localStorage[product.id]=toArray(product);
		console.log(localStorage[1]);
		</script>
			
	</head>
	
	<body>
		<div data-role="page" class="bg01">
			<div data-role="header" data-position="fixed" id="opcitybg">
				<a id="headop" href="c_personal.html" data-role="button" data-icon="user" data-iconpos="notext"></a>
				<h1>商品详情</h1>
				<a id="headop" href="c_productList.html" data-role="button" data-icon="search"
					data-iconpos="notext"></a>
			</div>
			
			<div data-role="main" class="ui-content">
				<section id="s-showcase">
					<div class="scroller">
						<div class="itbox main"><a class="item"><img src="img/p_detail/ipad2.jpg"/></a></div>
					</div>
				</section>
				<section id="s-from" class="mui-flex"> </section>
				<section id="s-title">
					<div class="main">
						<h1><script>product.descrption="款 256GB iPad Pro 九成新";
						document.write(localStorage[1][0]);
						document.write(localStorage[1][1]);
						document.write(localStorage[1][2]);
						document.write(localStorage[1][3]);
						</script></h1>
					</div>
					<div class="sub">
						<div class="slogon"></div>
					</div>
				</section>
				<section id="s-price"> <span class="mui-price big"> <i class="mui-price-rmb">&yen;</i> <span class="mui-price-integer">4000</span> <span class="mui-price-decimal"></span> </span> </section>
				<section id="s-rate" data-spm=""> </section>
				<ul class="table-view" style="margin-top: 10px;">
				  <li class="table-view-cell media"> <a class=""> 
				    <div class="media-body"> 一位网友
				      <p>自用ipad，无磕碰无划痕，2019年初购买于官网，有发票凭证。价格已是最低，需要可以直接拍下。</p>
				    </div>
				    </a> </li>
				</ul>
				<div class="ipo">
				  <ul class="table-view">
				    <li class="table-view-cell media"> <a class="">
				      <div class="media-body"> 图文详情 </div>
				      </a> </li>
				  </ul>
				  <!-- <div class="leftc"> <img src="img/p_detail/ipad1.jpg" /> </div> -->
				  <div class="rightc">
<!-- 				    <p style="position: relative;"> 
					<img src="img/p_detail/pad4.JPG" /> </p>
				    <p> <img src="img/p_detail/pad5.JPG" /></p>
					<p><img src="img/p_detail/ipad1.jpg" /></p> -->
					<script type="text/javascript">
						for (var i = 0; i < product.imgUrl.length; i++) {
							document.write("<p><img src='"+product.imgUrl[i]+"'/></p>")
							console.log("<p>img src='"+product.imgUrl[i]+"'/></p>");
						}
					</script>
				  </div>
				</div>
			</div>
			<div data-role="footer"  id="s-actionBar-container">
				<div id="s-actionbar" class="action-bar mui-flex align-center">
				  <div class="web  cell"> 
				  <img src="img/p_detail/kefu.png" width="20" height="20" />
				    <p>卖家</p>
				  </div>
				  <button class="cart cell" id="cart">加入购物车</button>
				  <button class="buy cell" id="pay">立即购买</button>
				  <div class="activity-box cell"></div>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		$("#pay").click(function(){
			location.href="c_Paying.html";
		})
		
		$("#cart").click(function(){
			location.href="s_shopping_cart.html";
		})
		
	</script>
	
</html>
